﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Activation : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            string hash = Request.QueryString["hash"] != null ? Request.QueryString["hash"].ToString() : "";
            int userid = Convert.ToInt32(Request.QueryString["userid"] != null ? Request.QueryString["userid"].ToString() : "0");
            if (!string.IsNullOrWhiteSpace(hash) && userid>0)
            {
                ProxyWrapper.UserServiceWrapper _service = new ProxyWrapper.UserServiceWrapper();
                string msg = _service.ActivateUser(userid, hash);
                Response.Write("<center><b>"+msg+"</b></center>");
            }
        }
        catch (Exception ex)
        {
            Response.Write("Error while activating user. Please contact ssica.org system administrator");
        }
    }
}